digit = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
num = input().split()
if num[0] in digit:
    s = digit.index(num[0])
if num[1] in digit:
    d = digit.index(num[1])
if num[2] in digit:
    e = digit.index(num[2])
n = s * 100 + d * 10 + e
print(n)
